package com.ny.mapper;

import com.ny.entity.Classrooms;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ClassroomMapper {
    List<Classrooms> findAllClassrooms();
    List<Classrooms> searchClassrooms(
            @Param("classroomName") String classroomName,
            @Param("capacity") String capacity,
            @Param("status") String status,
            @Param("building") String building,
            @Param("description") String description);
    @Update("update classrooms set status = #{status} where classroom_id = #{classroomId}")
    void updateClassroomStatusById(@Param("classroomId") int classroomId, @Param("status") String status);

}
